s = input()
s += ' '
v = []
s1 = ""
ans4 = 0
ans5 = 0
ans6 = ""
ans7 = 0

for i in range(len(s)):
    if s[i] != ' ':
        s1 += s[i]
    elif s1 != "":
        v.append(s1)
        if len(s1) <= 3:
            ans4 += 1
        for j in range(len(s1)):
            if s1[j] == '-':
                ans5 += 1
                break
        if i == 0:
            ans6 = s1
            ans7 = len(s1)
        elif len(s1) > ans7:
            ans6 = s1
            ans7 = len(s1)
        s1 = ""

ans1 = len(v)
ans2 = 0

for i in range(len(v)):
    if 'A' <= v[i][0] <= 'Z':
        ans2 += 1

ans3 = 0

for word in v:
    p = False
    for char in word:
        if 'A' <= word[0] <= 'Z' or 'a' <= word[0] <= 'z':
            p = True
    if p:
        ans3 += 1

if ans1 in (0, 1):
    print("Мало данных для анализа")
else:
    print(ans1)
    print(ans2)
    print(ans3)
    print(ans4)
    print(ans5)
    print(ans6)
    print(ans7)

